/**
 * Copyright (c) 2016-2019 九点科技 All rights reserved.
 *
 * http://www.9dyun.cn
 *
 * 版权所有，侵权必究！
 */
package com.dian.modules.base.entity;

import com.dian.common.validator.group.AddGroup;
import com.dian.common.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import com.dian.common.entity.BaseEntity;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.dian.common.validator.group.Group;
import org.hibernate.validator.constraints.Length;
/**
 * 分类表
 *
 * @author Jinag Run
 * @email 1685269193qq.com
 * @date 2019-05-22 23:47:42
 */
@Data
@TableName("base_class")
public class ClassEntity extends BaseEntity {
	private static final long serialVersionUID = 1L;
    /**
	 * 分类编码
	 */
    @NotBlank(message="分类编码不能为空",groups={AddGroup.class, UpdateGroup.class})
    @Length(max=20, groups={AddGroup.class, UpdateGroup.class}, message="分类编码长度不能超过20个字符")
    private String classCode;
    /**
	 * 分类名称
	 */
    @NotBlank(message="分类名称不能为空",groups={AddGroup.class, UpdateGroup.class})
    @Length(max=100, groups={AddGroup.class, UpdateGroup.class}, message="分类名称长度不能超过100个字符")
    private String className;
    /**
	 * 分类:1-商品类型-PRODUCT;2-用户类型-USER
	 */
    @NotNull(message="分类不能为空",groups={AddGroup.class, UpdateGroup.class})
    private Integer classType;
    /**
	 * 分类排序
	 */
    @NotNull(message="分类排序不能为空",groups={AddGroup.class, UpdateGroup.class})
    private Integer classSeq;
    /**
	 * 上级ID
	 */
    @NotNull(message="上级ID不能为空",groups={AddGroup.class, UpdateGroup.class})
    @JsonProperty(value = "parentId")
    private Long parentId;

    /**
     * 上级名称
     */
    @NotBlank(message="上级名称不能为空",groups={AddGroup.class, UpdateGroup.class})
    @JsonProperty(value = "parentName")
    private String parentName;
    /**
	 * 路径ID
	 */
    @NotBlank(message="路径ID不能为空",groups={AddGroup.class, UpdateGroup.class})
    @Length(max=4000,groups={AddGroup.class, UpdateGroup.class}, message="路径ID长度不能超过4000个字符")
    private String pathId;
    /**
	 * 路径名称
	 */
    @NotBlank(message="路径名称不能为空",groups={AddGroup.class, UpdateGroup.class})
    @Length(max=4000,groups={AddGroup.class, UpdateGroup.class}, message="路径名称长度不能超过4000个字符")
    private String pathName;
    /**
	 * 是否有效:0-禁用-DISABLE;1-启用-NORMAL
	 */
    @NotNull(message="是否有效不能为空",groups={AddGroup.class, UpdateGroup.class})
    private Integer isValid;
}
